package com.dq.service.org;

import com.dq.exception.customException.AdminException;
import com.dq.controller.in.org.OrgQuery;
import com.dq.vo.Vo;
import com.dq.domain.org.Org;
import com.dq.domain.sys.section.SysSection;
import com.dq.domain.sys.user.user.WxUser;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author liuhui
 * @date 2019/12/2 0002 18:04:45
 */
@Repository
public interface OrgService {

    public Org save(Org org) throws AdminException;
    /**
     * 获取 祖级列表, 并对父级对象验证
     */
    public void getAncestors(SysSection section);
    /**
     * 保存时 重复对象验证
     */
    public void repetitionObjectBySave(SysSection section);

    public Org update(Org org) throws AdminException;
    /**
     * 修改时 重复对象验证
     */
    public void repetitionObject(SysSection section);

    /**
     * 删除门店， 同时删除门店账号
     */
    public void delete(Long id) throws AdminException;

    /**
     * 对象初始化
     */
    public Org initObject(Org org) throws AdminException;

    public List<Org> list(OrgQuery orgQuery) throws AdminException;
    public Long count(OrgQuery orgQuery) throws AdminException;
    /**
     * boss获取 负责区域内的门店列表 分页
     */
    public List<Org> listByLogin(OrgQuery orgQuery) throws AdminException;
    public Long counteByLogin(OrgQuery orgQuery) throws AdminException;

    public List<Org> getListAllByUser() throws AdminException;
    public String getIdListAllByUser() throws AdminException;

    public List<Org> getListAll() throws AdminException;

    /**
     * 生成门店初始 顾客， 用于第一批用户授权登录
     */
    public WxUser initialOrgWxUser(Org org);
}
